package uscdb.dao.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.stereotype.Repository;

import uscdb.dao.ReviewDaoI;
import uscdb.model.Treview;

@Repository
public class ReviewDaoImpl extends BaseDaoImpl<Treview> implements ReviewDaoI {

	@Override
	public Treview getByName(String reviewName) {
		String hql = "from Treview t where t.name = :reviewName";
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("reviewName", reviewName);
		Treview treview = get(hql, params);
		if (null != treview) {
			return treview;
		}
		return null;
	}

}
